<!--START JS-->
<i id="scriptTag">/static/js/console/shopEdit.js</i>
<link rel="stylesheet" type="text/css" href="/static/js/plugins/uploadify/uploadify.css" />
<link rel="stylesheet" type="text/css" href="/static/css/plugins/chosen/chosen.css" >
<!--END JS-->

<div class="row wrapper border-bottom white-bg page-heading">
    <div class="col-lg-10">
        <h2><?php echo $page_title; ?></h2>
        <p>您可在此进行<?php echo $page_title; ?></p>
    </div>
    <div class="col-lg-2"></div>
</div>

<!--START shopEdit-->
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox">
                <div class="ibox-title">
                    <h5><?php echo $page_title; ?></h5>
                </div>
                <div class="ibox-content">
                    <form role="form" action="/console/shopEdit" method="post">
                        <input type="hidden" name="id" value="<?php echo $detail['id']; ?>">
                        <div class="form-group" title="点击上传门店图片" style="min-height:123px;">
                            <label>门店图片：</label>
                            <div class="row">
                                <div class="col-lg-3">
                                    <input type="file" id="shop_img_0" style="display: none;">
                                    <input type="hidden" value="<?php echo $detail['shop_img_0']; ?>" name="shop_img_0">
                                    <div class="shop-img-cover" style="position:absolute;top:0px;">
                                        <?php if ($detail['shop_img_0']) { ?>
                                            <img style="width: 200px;height:100px;" src="<?php echo $detail['shop_img_0']; ?>"/>
                                        <?php } ?>
                                    </div>
                                </div>
                                <div class="col-lg-3">
                                    <input type="file" id="shop_img_1" style="display: none;">
                                    <input type="hidden" value="<?php echo $detail['shop_img_1']; ?>" name="shop_img_1">
                                    <div class="shop-img-cover" style="position:absolute;top:0px;">
                                        <?php if ($detail['shop_img_1']) { ?>
                                            <img style="width: 200px;height:100px;" src="<?php echo $detail['shop_img_1']; ?>"/>
                                        <?php } ?>
                                    </div>
                                </div>
                                <div class="col-lg-3">
                                    <input type="file" id="shop_img_2" style="display: none;">
                                    <input type="hidden" value="<?php echo $detail['shop_img_2']; ?>" name="shop_img_2">
                                    <div class="shop-img-cover" style="position:absolute;top:0px;">
                                        <?php if ($detail['shop_img_2']) { ?>
                                            <img style="width: 200px;height:100px;" src="<?php echo $detail['shop_img_2']; ?>"/>
                                        <?php } ?>
                                    </div>
                                </div>
                                <div class="col-lg-3">
                                    <input type="file" id="shop_img_3" style="display: none;">
                                    <input type="hidden" value="<?php echo $detail['shop_img_3']; ?>" name="shop_img_3">
                                    <div class="shop-img-cover" style="position:absolute;top:0px;">
                                        <?php if ($detail['shop_img_3']) { ?>
                                            <img style="width: 200px;height:100px;" src="<?php echo $detail['shop_img_3']; ?>"/>
                                        <?php } ?>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="form-group <?php if (form_error('shop_name')) echo 'has-error'; ?>">
                            <label>名称：</label> 
                            <input type="text" placeholder="请输入门店名称" class="form-control" value="<?php echo $detail['shop_name']; ?>" name="shop_name" required>
                        </div>
                        <div class="form-group <?php if (form_error('shop_desc')) echo 'has-error'; ?>">
                            <label>介绍：</label> 
                            <textarea class="form-control" name="shop_desc" placeholder="请输入门店介绍" required><?php echo $detail['shop_desc']; ?></textarea>
                        </div>
                        <div class="form-group <?php if (form_error('shop_phone')) echo 'has-error'; ?>">
                            <label>电话：</label> 
                            <input type="text" placeholder="请输入门店联系电话" class="form-control" value="<?php echo $detail['shop_phone']; ?>" name="shop_phone" minlength="8" maxlength="15" required>
                        </div>
                        <div class="form-group">
                            <label>省市：<?php if (form_error('shop_province') || form_error('shop_city')) echo '<span class="text-danger">省市均不能为空！</span>'; ?></label>
                            <div class="row">
                                <div class="col-lg-5">
                                    <select class="province-chosen-select" data-placeholder="请选择省"  style="width:350px;" tabindex="2" id="area-province-chosen" name="shop_province">
                                        <option value=""></option>
                                    </select> 
                                </div>
                                <input type="hidden" value="<?php echo $detail['shop_province']; ?>" id="provinceData">
                                <div class="col-lg-5">
                                    <select class="city-chosen-select" data-placeholder="请选择市" multiple style="width:350px;" tabindex="4" id="area-city-chosen">
                                        <option value=""></option>
                                    </select> 
                                </div>
                                <input type="hidden" value="<?php echo $detail['shop_city']; ?>" name="shop_city" id="cityData">
                            </div>
                        </div>
                        <div class="form-group <?php if (form_error('shop_address')) echo 'has-error'; ?>">
                            <label>详细地址：</label> 
                            <input type="text" placeholder="请输入门店地址" class="form-control" value="<?php echo $detail['shop_address']; ?>" name="shop_address" required>
                        </div>
                        <div class="form-group">
                            <button type="button" class="btn btn-sm btn-primary" id="save-btn">保存</button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<!--END shopEdit-->